package com.koron.system.unityUser.mapper;

import com.koron.bean.system.org.OrgBean;
import com.koron.bean.system.staff.StaffBean;
import com.koron.system.userOrg.bean.po.AppUserOrgPo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface UnityUserMapper {
    /**
     * 批量插入组织表
     * @param orgBeans
     */
    void batchInsertOrg(@Param("orgBeans") List<OrgBean> orgBeans);

    /**
     * 插入用户
     * @param staffBean
     */
    void insertUser(@Param("staffBean") StaffBean staffBean);

    /**
     * 批量插入用户
     * @param staffBeans
     */
    void batchInsertUser(@Param("staffBeans") List<StaffBean> staffBeans);

    /**
     * 批量插入用户组织关系
     * @param userOrgPos
     * @return
     */
    void batchInUpUserOrg(@Param("list") List<AppUserOrgPo> userOrgPos);

    void truncateTable();

    List<AppUserOrgPo> findDefaultOrg();

    int batchUpdate(@Param("list") List<AppUserOrgPo> userOrgPos);
}
